#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int findMaxConsecutiveOnes(int* nums, int numsSize) 
{
	int i = 0;
	int m[10] = { 0 };
	int mid = 0;
	for (i = 0; i < numsSize; i++)
	{
		if (nums[i] == 1)
		{
			int k = 1;
			for (int j = i+1; j < numsSize; j++)
			{
				if (nums[j] == 1)
					k++;
				else
					break;
			}
			m[mid++] = k;
		}
	}
	int max = 0;
	for (i = 0; i < mid; i++)
	{
		if (max < m[i])
			max = m[i];
	}
	return max;
}

int main()
{
	int num[100] = {0,0,1,1,0,1,0,1,1,1,1,1,1,1,0};
	int ret = findMaxConsecutiveOnes(num, 15);
	printf("%d\n", ret);
	return 0;
}